import React from 'react'
import PropTypes from 'prop-types'
import CommonHeader from '../component/common_header/index'
import TopicList from '../component/topic_list/index'
import TopicListInfo from '../component/topic_list_info/index'
import tabTitle from '../constant/create_title'

const TopicListPage = (props) => {
  const { tab } = props.match.params
  return (
    <div>
      <CommonHeader title={tabTitle(tab)} />
      <TopicListInfo tab={tab} />
      <TopicList tab={tab} limit={10} />
    </div>
  )
}
export default TopicListPage

TopicListPage.propTypes = {
  match: PropTypes.objectOf(Object),
}
